package com.vastcom.tyauthcenter.service;

import com.vastcom.tyauthcenter.model.*;
import com.vastcom.tyauthcenter.vo.NzTreeVo;

import java.util.List;

public interface ManageService {


    Member saveMember(Member member);
    boolean deleteMember(String id);
    Member getMember(String id);
    List<Member> getMemberListByDept(String dept);
    List<Member> getMemberListByRole(String role);
    Member getMemberByUserNameAndPass(String username, String pass);
    boolean isExsistUserName(String username);


    Dept saveDept(Dept dept);
    boolean deleteDept(String id);
    Dept getDept(String deptid);
    List<Dept> getDeptByPid(String pid);
    List<Dept> getRootDept();
    List<NzTreeVo> getDeptNzTreeByPid(String pid);



    Rolegroup saveRoleGroup(Rolegroup rolegroup);
    boolean deleteRoleGroup(String id);
    Rolegroup getRoleGroup(String id);
    List<Rolegroup> getRoleGroupList();


    List<Roleresource> saveRoleResource(List<Roleresource> rl);
    boolean deleteRoleResources(List<Roleresource> rl);
    Roleresource getRoleResource(String id);
    List<Roleresource> getRoleResourceByRole(String roleid);
    List<Roleresource> getRoleResourceByRoleAndType(String role,String type);
    List<Roleresource> getRoleResourceByResourceid(String resourceid);
    boolean haveRightByResourceIdAndRole(String resourcceid,String role);

    Rightresource saveRightResource(Rightresource rightresource);
    boolean deleteRightResource(String id);
    Rightresource getRightResource(String id);
    List<Rightresource>  getRightResourceListByType(String type);
    List<Rightresource> getRightRightResourceListByPid(String pid);
    List<NzTreeVo> getRightResourceNztreeViByPid(String pid);
    List<NzTreeVo> getRightResourceNztreeViByPidForZyzc(String pid);

    Loginticket saveLoginticket(Loginticket loginticket);
    Loginticket getLoginticketBYid(String id);



    String getCurrentUserId();
    String getCurrentRole();

    Loginlog saveLoginlog(Loginlog loginlog);
}
